// UsesStatTable.h : stores the variables used in each statement.
// Author: Achyut P Balaji
//

#ifndef USES_STAT_TABLE_H
#define USES_STAT_TABLE_H
#include"SPA_Data_Types.h"

using namespace std;

typedef vector<VAR_INDEX> VAR_LIST;

class UsesStatTable {
private:
	vector<VAR_LIST> variablesUsed;
	vector<VAR_LIST> tempVarUsed;
	static UsesStatTable *obj;
	UsesStatTable();
	bool initialised;
public:
	static UsesStatTable* getInstance();
	BOOLEAN addEntry(VAR_LIST varUsed);
	BOOLEAN addEntry(STATEMENT_INDEX n, VAR_LIST varUsed);
	BOOLEAN isUsed(STATEMENT_INDEX n, VAR_INDEX ind);
	VAR_LIST getVarUsed(STATEMENT_INDEX n);
	void initialise();
};


#endif